The present invention relates to retrieving desired information from a data structure that stores the information. More specifically, the invention relates to searching for best matches in tables of information utilizing at least one tree.
Computer systems are great tools for storing vast amounts of data. One way that the data is commonly stored is to utilize tables where each row represents a related subset of data. Oftentimes, the tables form the basic data structure of a relational database management system (RDBMS).
Some types of searches for data within a table are fairly straightforward. For example, if a table stores the names and addresses of customers and one wanted to determine the address of a customer named “John Smith,” the user could specify that he or she is interested in the address fields of the row that included a name field of “John Smith.” The computer system could search the rows in the table until the row with the desired name field was found and return the desired address fields. There are many known techniques that allow these simple searches to be performed very accurately and efficiently.
It should be obvious that not all user queries are as simple as described above. For example, a user could be searching for a row that is the best match for a first name field of “John” and a last name field “Smith.” Furthermore, one of the fields may take precedence over the other field (or fields) in the case of a tie. Thus, if there is no row that has a first name field of “John” and last name field of “Smith,” the computer system could return a best match of a customer named “Jack Smith.”
One traditional approach to implementing a search as described above has been to utilize the construction of perfect hash functions. Although perfect hash functions can be fairly efficient, they are computationally expensive to compute. The expense of perfect hash functions is further increased when the system allows dynamic modification of the data because the dynamic modification of the data generally necessitates recomputation of the perfect hash functions.
What is needed, therefore, are innovative techniques for searching for best matches in tables of information. Additionally, it would be beneficial to provide the searching performance for perfect hash functions, while still allowing the dynamic modification of the data.